public class Test {
    public static void main(String[] args) {
        TestBinaryTree testBinaryTree=new TestBinaryTree();
        TestBinaryTree.TreeNode root=testBinaryTree.createTree();

        System.out.println("========前序=======");
        testBinaryTree.preOrder(root);
        System.out.println();

        System.out.println("========中序=======");
        testBinaryTree.inOrder(root);
        System.out.println();

        System.out.println("========后序=======");
        testBinaryTree.postOrder(root);
        System.out.println();

        System.out.println("========节点总数=======");
        System.out.println(testBinaryTree.size(root));

        testBinaryTree.size2(root);
        System.out.println(TestBinaryTree.nodeSize);

        System.out.println("=======叶子结点个数======");
        System.out.println(testBinaryTree.getLeafNode(root));

        testBinaryTree.getLeafNode2(root);
        System.out.println(testBinaryTree.leafSize);

        System.out.println("=======第k层节点个数结点个数======");
        System.out.println(testBinaryTree.getKLevelNode(root,3));

        System.out.println("=======求树的高度======");
        System.out.println(testBinaryTree.getHeight(root));

        System.out.println("=======找到指定值的节点======");
        System.out.println(testBinaryTree.find(root,'A').val);

    }
}
